package com.cloudcross.ssp.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cloudcross.ssp.base.dao.GenericIBatisDao;
import com.cloudcross.ssp.model.CityCode;
import com.cloudcross.ssp.service.ICityCodeService;

@Service
public class CityCodeService implements ICityCodeService {
	
	@Autowired
	private GenericIBatisDao mybatisDao;

	@Override
	public List<CityCode> queryCityCode() {
		return mybatisDao.getList("cityCodeSqlMapper.queryCityCodeAll");
	}
	
	public List<CityCode> queryCityCodeListByCn(String cn){
		Map<String,Object> map = new HashMap<String,Object>();
		map.put("cn", cn);
		return mybatisDao.getList("cityCodeSqlMapper.queryCityCodeByCn",map);
	}

}
